//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//// PARTICULAR PURPOSE.
////
//// Copyright (c) Microsoft Corporation. All rights reserved

#pragma once

#include <xaudio2.h>

// MediaReader:
// This is a helper class for the SoundEffect class.  It reads small audio files
// synchronously from the package installed folder and returns sound data as a
// byte array.

ref class MediaReader
{
internal:
   MediaReader();

   Platform::Array<byte> ^ LoadMedia(_In_ Platform::String ^ filename);
   WAVEFORMATEX *GetOutputWaveFormatEx();

   protected private:
   Windows::Storage::StorageFolder ^ m_installedLocation;
   Platform::String ^ m_installedLocationPath;
   WAVEFORMATEX m_waveFormat;
};
